﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web.UI;
using DevExpress.Web.ASPxHeadline;
using DevExpress.Web.ASPxClasses;
using DevExpress.Web.ASPxCallback;
using DevExpress.Web.ASPxGridView;

using LMD.Constant;
using LMD.Lib.DataClass;
using LMD.Lib.Interface;
using LMD.Lib.Controls;

public partial class MRTGList : ICPRelationshipPage
{
    #region Properties

    #endregion Properties

    #region Event Handlers

    protected override void Page_Load(object sender, EventArgs e)
    {
        m_lsPermittedRoles.Add(ICPUserRole.CAR);
        base.Page_Load(sender, e);

        Page.Title = "ICP Lintasarta: Relationship, MRTG List";
        if (!IsPostBack && !IsCallback)
        {
            
        }
        InitMRTGList();
    }
    protected void dgMRTGList_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
    {
    }
	protected void btnExport_Click(object sender, EventArgs e)
    {
        String sxFilename = String.Format("MRTG List - {0}",DateTime.Now.ToString());
        dgExporter.WriteXlsToResponse(sxFilename);
    }
    #endregion Event Handlers

    #region Custom Methods
    protected override void DoSearch(String sxSearchQuery)
    {
        throw new NotImplementedException();
    }
    public void InitMRTGList()
    {
        Cached.MonitoringMRTGTable cachedMRTG = new Cached.MonitoringMRTGTable();
        DataTable dtMRTGList = cachedMRTG.GetMRTGList();

        dgMRTGList.DataSource = dtMRTGList;
        dgMRTGList.DataBind();
    }

    
    #endregion Custom Methods
}
